<template>
	<view class="details">
		<xbd-pages-content :title="title">
			<template #content>
				<view class="content" :style="'minHight : ' + windowHeight + 'px;'">
					<view class="box">
						<view class="">
							<text>会议地点</text>
						</view>
						<view class="box_right">
							<text>{{fromDate.meeting}}</text>
						</view>
					</view>
					<view class="box">
						<view class="">
							<text>会议名称</text>
						</view>
						<view class="box_right">
							<text>{{fromDate.name}}</text>
						</view>
					</view>
					<view class="box">
						<view class="">
							<text>主持人</text>
						</view>
						<view class="box_right">
							<text>{{fromDate.host}}</text>
						</view>
					</view>
					<view class="box">
						<view class="">
							<text>会服选项</text>
						</view>
						<view class="box_right">
							<text v-if="fromDate.service">是</text>
							<text v-else>否</text>
						</view>
					</view>
					<view class="box">
						<view class="">
							<text>会议主题</text>
						</view>
						<view class="box_right">
							<text>{{fromDate.title}}</text>
						</view>
					</view>
					<view class="box">
						<view class="">
							<text>会议内容</text>
						</view>
						<view class="box_right">
							<text>{{fromDate.content}}</text>
						</view>
					</view>

					<view class="box">
						<view class="">
							<text>会议日期</text>
						</view>
						<view class="box_right">
							<text>{{fromDate.date| timeFormat("YYYY-MM-DD")}}</text>
						</view>
					</view>
					<view class="box">
						<view class="">
							<text>会议时间</text>
						</view>
						<view class="box_right">
							<text>{{fromDate.startTime+' - '+fromDate.endTime}}</text>
						</view>
					</view>
				</view>
			</template>
		</xbd-pages-content>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';
	import {
		Meeting
	} from '@/api/index.js';
	export default {
		data() {

			return {
				id: '',
				title: '会议邀请',
				fromDate: {

				}
			}
		},
		methods: {
			async init() {
				try {
					const res = await Meeting.getDetail(this.id);
					uni.hideLoading();
					this.fromDate = res.data.detail;
					// res.data.detail.apply_process.forEach(item=>{
					// 						if(!item.name.length){
					// 							this.department.push(item.identity)
					// 						}

					// 					})
					console.log(res, 'res')
				} catch (e) {
					uni.hideLoading();
					console.log(e);
				}
			},
		},
		computed: {
			...mapState(['windowHeight'])
		},
		onLoad(res) {
			this.id = res.id
			this.init()
			// this.type =res.msg
			console.log(res)
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep .draft:after {
		border: none;
	}

	.content {
		padding: 30px 50rpx;

		.box {
			position: relative;
			display: flex;
			justify-content: space-between;
			margin-bottom: 30rpx;
			font-size: 32rpx;
			color: #194769;

			.box_right {
				box-sizing: border-box;
				word-wrap: break-word;
				word-break: normal;
				word-break: break-all;
				color: #222222;
				padding-top: 4rpx;
				font-size: 28rpx;
				width: 450rpx;
				display: flex;
				justify-content: space-between;
			}
		}
	}
</style>
